<?php

namespace adminmatrix\server\app\lists;

use think\App;
use think\Model;
use think\Request;

abstract class BaseListsData implements ListsInterface
{
    use ListsPagerTrait , ListsSearchTrait , ListsOrderTrait;

    public Request $request;

    protected Model $model;
    # 分页
    protected int $pageNo;          # 初始化页码
    protected int $pageSize;        # 初始化每页数量
    protected int $pageType;        # 初始化分页 0 : 正常分页获取  | 1  最大化分页获取
    protected int $limitOffset;     # 初始化偏移量
    protected int $limitLength;     # 初始化长度


    public function __construct(public App $app )
    {
        $this->request = $this->app->request;
        $this->initialization();

        # 初始化分页
        $this->initPage();

        # 初始化搜索
        $this->initSearch();

        # 初始化排序
        $this->initOrder();
    }

    protected function initialization() : void
    {}


}